package com.jright.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jright.dao.TopicDao;
import com.jright.po.Topic;
import com.jright.service.TopicService;

@Service("topicService")
public class TopicServiceImpl implements TopicService{

	@Autowired
	private TopicDao topicDao;
	
	public int publishMyTopic(String title, String publish_no, String introduction) {
		return this.topicDao.publishMyTopic(title, publish_no, introduction);
	}

	@Override
	public List<Topic> teacherTopic(String publish_no) {
		// TODO Auto-generated method stub
		return this.topicDao.teacherTopic(publish_no);
	}

	@Override
	public List<Topic> myPublishTopic(String no) {
		// TODO Auto-generated method stub
		return this.topicDao.myPublishTopic(no);
	}

	@Override
	public Topic findTopicByTopicId(Integer topic_id) {
		// TODO Auto-generated method stub
		return this.topicDao.findTopicByTopicId(topic_id);
	}

	@Override
	public int updateTopicStatus(String status, Integer id) {
		// TODO Auto-generated method stub
		return this.topicDao.updateTopicStatus(status, id);
	}

	@Override
	public int publishTeacherTopic(String title, String publish_no, String introduction) {
		// TODO Auto-generated method stub
		return this.topicDao.publishTeacherTopic(title, publish_no, introduction);
	}

	@Override
	public int updateTopicIsagree(String isagree, Integer id) {
		// TODO Auto-generated method stub
		return this.topicDao.updateTopicIsagree(isagree, id);
	}

}
